/* SPDX-License-Identifier: GPL-2.0+ */

#ifndef _PART_ISO_H
#define _PART_ISO_H

#define ISO_STANDARD_ID 	"CD001"
#define ISO_ECMA_ID     	"CDW01"
/* volume descriptor types */
#define ISO_VD_PRIMARY 		1
#define ISO_VD_SUPPLEMENTARY 	2
#define ISO_VD_END		255

#define BRVD	0x11
#define PVD_OFFSET 0x10
#define CD_SECTSIZE 		2048

typedef struct iso_directory_record {
	unsigned char 	length;
	unsigned char 	ext_attr_length;
	unsigned int 	extloc_LE;
	unsigned int 	extloc_BE;
	unsigned int 	extlen_LE;
	unsigned int 	extlen_BE;
	char 	date[7];
	unsigned char 	flags;
	unsigned char 	file_unit_size;
	char 	interleave;
	unsigned short 	volume_sequence_number_LE;
	unsigned short 	volume_sequence_number_BE;
	unsigned char 	namelen;
	char 	name[207];
} __packed iso_directory_record_t;

unsigned long iso_dread(struct blk_desc *block_dev, lbaint_t start,
                        lbaint_t blkcnt, void *buffer);

#endif /* _PART_ISO_H */
